var events = require("events");
var util=require("util");
var EvEm = events.EventEmitter;

function Radio(name,p) {
    this.name=name;
    this.p=p;
    EvEm.call(this);
}
util.inherits(Radio,EvEm);
Radio.prototype.play = function () {
    console.log("\""+this.name+" \" "+this.p+" opened")
    setTimeout(() => {
        console.log("lala...");
        this.stop();
    }, 2000);
}
Radio.prototype.stop = function () {
    console.log("\""+this.name+" \" "+this.p+" closed")
}
module.exports=Radio;